package cn.hg.jbsa.admin.controller.system.validator;

import com.jfinal.core.Controller;

import cn.hg.jboot.core.validator.BaseValidator;

/**
 * @author 胡高
 * @date 2022/12/31
 */
public class JbsaLoginValidator extends BaseValidator {

    /* (non-Javadoc)
     * @see com.jfinal.validate.Validator#handleError(com.jfinal.core.Controller)
     */
    @Override
    protected void handleError(Controller c) {

    }

    /* (non-Javadoc)
     * @see com.jfinal.validate.Validator#validate(com.jfinal.core.Controller)
     */
    @Override
    protected void validate(Controller c) {
        this.validateString("account", 3, 30, "account", "账号必须填写3到30长度的字符！");
        this.validateString("password", 6, 20, "password", "密码必须填写6到20长度的字符！");
        this.validateCaptcha("captcha", "captcha", "验证码错误！");
    }

}
